Auto-generate experimental warnings and usage docs for typekits from library metadata#9564
Auto-generate experimental warnings and usage docs for typekits from library metadata#9564
Conversation
…mentation Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
|
@copilot please pull the latest from the main branch and fix any issues with website build |
Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
This reverts commit f6c5749.
Done. I've successfully merged the latest main branch (commit aa2b623). The website build completes without errors, and all astro checks pass with 0 errors, 0 warnings, and 0 hints. The HTTP typekits documentation now includes:
The documentation is fully compatible with the latest main branch changes. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot This problem cannot be solved by editing a static documentation web page, because the reference documentation is automatically generated from the source code using |
|
@copilot, also you need to merge in the latest changes from main. You should do this whenever you make an update to the code in your branch. |
…umentation Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Done (commit 7b6e19e). I've modified tspd to automatically detect Changes made:
The documentation is now auto-generated from source code comments, so future updates will automatically reflect changes to the experimental status and don't require manual documentation edits. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot also you need to merge in the latest changes from main. You should do this whenever you make an update to the code in your branch. |
Done (commit 27e2db9). I've merged the latest changes from main branch into the PR branch. The merge completed successfully with 51 commits from main integrated. |
| // Generate import statement based on package | ||
| let importStatement: string; | ||
| if (isHttpPackage && typekit.isExperimental) { | ||
| importStatement = `import "@typespec/http/experimental/typekit";`; |
There was a problem hiding this comment.
this pattern is followed for experimental packages, I feel like we can construct this from the package name and the fact that it is experimental, without having specific if statements for specific packages embedded in the code.
website/src/content/docs/docs/standard-library/reference/typekits.mdx
Outdated
Show resolved
Hide resolved
…r typekits Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Done (commit 843912c). I've addressed all review feedback:
Result:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…s and usage docs Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Done (commit eeb575d). Refactored the logic to eliminate duplication:
The logic is now much simpler with less duplication between compiler and non-compiler cases. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Pull in the latest from main and fis the formatting of any changed files as needed (pnpm format) |
…ilot/fix-http-typekits-documentation
Done (commit a1b68fe). Merged the latest from main branch and ran Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
| import { Badge${typekit.isExperimental ? ", Aside" : ""} } from '@astrojs/starlight/components'; | ||
| `} | ||
| </> | ||
| {typekit.isExperimental && ( |
There was a problem hiding this comment.
This is still too complex and difficult to read. It should be possible to simplify the logic if the text of the pre-import and post-import documentation is conditional, instead of making large conditional code blocks.
There was a problem hiding this comment.
Done (commit 4717332). Simplified the logic by extracting conditional text to variables (registrationImport, typekitImport, sideEffectsExplanation). The code is now much easier to read with minimal conditional blocks and clearer intent.
Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.